package hmvictor.jpql.types;

import java.util.Date;
import javax.persistence.Parameter;
import javax.persistence.Query;
import javax.persistence.TemporalType;

/**
 *
 * @author Victor
 */
public class DateTemporalDate extends AbstractParameterType<Date>{

    public DateTemporalDate() {
        super("Date");
    }

    @Override
    public Editor<Date> createEditor() {
        return new DateEditor();
    }

    @Override
    public void setParameter(Query query, Parameter name, Date value) {
        query.setParameter(name, value, TemporalType.DATE);
    }

}
